from views import page as pageBase

from api import api


class IrTranslation(object):
    # page = pageBase.irTranslation

    def test(self,):
        self.test_get_field_selection()
        # print(res)

        # res = self.odoorpc.search([])
        # print(res)
        # res = self.read(1, ['name'])
        # print(res)
        # res = self.odoorpc.read(1, ['name'])
        # print(res)

    def test_get_field_selection(self):
        # print('sech ok,', self.page)
        # res = api.env['ir.translation'].get_field_selection(
        #     'account.move', 'state')

        # print('sech ok,', res)

        # res = api.env['account.move'].fields_get2(
        #     ['state'], ['type', 'selection'])

        # print('sech ok,', res)

        # res = api.env['account.move'].fields_get2('search')

        # print('sech ok,', res)

        # self.dataList

        res = api.env['res.partner'].search_read([], fields=['company_id'])
        print('sech ok,', res)
        for r in res:
            print(r)

        res = api.env['res.partner'].search_read(
            [('company_id', '=', [1, False])], fields=['company_id'])
        print('sech ok,', res)
        for r in res:
            print(r)


irTranslation = IrTranslation()
